home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Almathera Ten Pack 2: CDPD 1
/
Almathera Ten on Ten - Disc 2: CDPD 1.iso
/
pd
/
026-050
/
049
/
plot
/
mouse2.c
< prev
next >
Wrap
Text File
|
1995-03-13
|
630b
|
34 lines
/* mouse2.c */
#define MAXX 639
#define MINX 0
#define MAXY 399
#define MINY 0
SHORT mx,my;
mouse()
{
char button;
struct IntuiMessage *BdMsg;
APTR Maddress;
button=1;
while(button){
while (BdMsg = (struct IntuiMessage *)GetMsg(w->UserPort)){
Maddress = BdMsg->IAddress;
mx = BdMsg->MouseX;
my = BdMsg->MouseY;
if (mx>MAXX)
mx=MAXX;
if (mx<MINX)
mx=MINX;
if (my>MAXY)
my=MAXY;
if (my<MINY)
my=MINY;
button=(*((unsigned char *)0xbfe001)) & 0x40;
ReplyMsg(BdMsg);
}
}
}